Various MinGW runtime fixes.