Various fixes for Win32 build scripts