Small refactoring

Use the dedicated function to check if we're running on Windows instead
of checking the platform directly.