Simplified platform detection for Windows
Merge pull request #3177 from rpherbig/master