overhaul mingw build script for 32 and 64bit builds