Added more compatibility hooks for running tests on Windows