Fixed macos compile failed.