fix build on linux and macos