Fix MinGW build (2)

Continuing from #232, this fixes building with MinGW on Windows. Some complaints were resolved, and it should build fine on both compilers.