Added definition for _WIN32_WINNT=0x501 for official MinGW compatibility