Fix build on mac osx