fix compile error on Ubuntu 12.04