Added a few fixes to make the test suite run on Windows