Use RuntimeInformation.IsOSPlatform to check for macOS (#5568)
Use RuntimeInformation.IsOSPlatform to check for macOS (#5568)

Follows what we already do for Windows.

Fixes https://github.com/dotnet/msbuild/issues/5454
rainersigwald/msbuild,cdmihai/msbuild,mono/msbuild,rainersigwald/msbuild,rainersigwald/msbuild,AndyGerlicher/msbuild,sean-gilliam/msbuild,cdmihai/msbuild,sean-gilliam/msbuild,rainersigwald/msbuild,AndyGerlicher/msbuild,sean-gilliam/msbuild,sean-gilliam/msbuild,AndyGerlicher/msbuild,cdmihai/msbuild,cdmihai/msbuild,AndyGerlicher/msbuild,mono/msbuild,mono/msbuild,mono/msbuild