fix the build on macosx