Fix MinGW build.

Looks like this thing affects MSVC too, but I didn't test that. It should work on both.