fix build on macos.