configure.ac: portability improvements (mostly mingw32)