Fixed all compilation errors on Ubuntu 2013.04