Lots of changes to cross-compile to Win32