improved mingw build