Fixes for Visual Studio 11 build