Fix MinGW issues, take 2.