Win32

More code / build file cleanups to make it build on win32.