Make minimal ./configure work on Windows/MinGW

These changes enable a minimal ./configure run to complete on MinGW. See the included README.mingw32 for build instructions.