Small fixes for building using Visual Studio on Windows