This commit changes the platform detection order to detect mingw compiling for windows (which defines `__GNUC__`). This commit also wraps the definition around a guard so it can be overridden via a define at build-time.