Remove C++11 features and fix build on Mac OS X