Fix tons of MINGW issues