(Win32) Some Win32 compatibility patches (courtesy of mudlord)