Changes to allow compiling on Win32