fix build fail on osx