fix build to compile on OS X with C++11