fixed macos compile failed.