Use uppercase for `OS` env variable

This is used for Windows system where this environment variable
is case-insitive. However, if Windows/Cygwin is used, Python
is case-sensitive and the conditions fail.
Merge pull request #9215 from uvsmtid/develop

Use uppercase for `OS` environment variable