fix build on mac os