windows: some fixes for Windows 64-bit build