Properly set '-std=c++0x' as a CXX_FLAGS

This fixes an issue with clang compiling C files.
(Note: this does not mean clang is supported yet)

Ideally, this should check the compiler for -std=c++11 support,
then check -std=c++0x if the previous failed, then error if that
fails as well.