Configure cleanly on Mac OS X without flags

On Mac OS X, GCC is ancient and doesn't understand -std=c++0x.  To fix
this, we can prefer the system default C compiler (which happens to be
clang on Mac OS X).  We also need to break the "-std=gnu++0x" flag
into CXXFLAGS because clang doesn't like C++ flags when run in C mode.