More fixes to make the tests work on Windows