Tweaks to allow build in Visual Studio