fix build on OS X