Change platform detection logic.

The previous version was not detecting Windows correctly for one reason
or another. Hopefully this detects it.