Proper detection for G++ and Clang for the C++11 flag

This correctly adds `-std=c++0x` to the build when the compiler is g++ or clang.