Fix tests on win64

These commits fix all tests and installation utilities on win64. I've confirmed that these are a green build on the bots.