Fixed compilation errors on g++-4.6