changes for building with clang++ on OS X