minor tweaks for mingw.