Workarounds for some mingw build problems.