Fix generation on macos