Fixed compiling in ubuntu 12.04