Fixed compilation to use C++11 and no command line hacks.