fix build on macosx