Win32 build system fixes