Fix a typo where platform was 'windows' not 'win'

This was reported by dracu on freenode
Fix the case statements to match platform
Land #3442, platform fix from dracu on freenode