Win32-related fixes