I've been using this fix in another branch locally, so it seems to work fine. The other #ifdef checks should be checked on too, as __MINGW32__ and __MINGW64__ do NOT seem to be defined when compiling that file