Update build scripts. Add a mingw version (untested).