Fix build and test on Windows.