fix build on Mac OSX