Fixing compile errors on OS X with Clang