Fix build on macos