Fix win32 errors/warnings