Fix warnings on MinGW.
Fix MinGW issues.