Check __MINGW32__ instead of !defined(_MSC_VER)