Added -fpermissive to allow g++ >= 4.8.14+ to compile.