fix linker errors on Mac OS X Mavericks and later 

On Mavericks, the default system library is libc++ rather than libstdc++. We have dependencies on the latter, so we need to build with it regardless of the system default. This change uses CXX flags to enforce usage of the libstdc++ library on Mac OS X release 13 and later (Mavericks).