fix build fails under osx