Fix compilation errors in Ubuntu 14.04