Unit test fixes for Windows