Windows-build fixes for 2.0