fix build for OS X