MinGW build fixes.