Win32 build fixes