Fixes to get working on Windows.