fix build on osx