Fixes for compilation errors on Visual Studio 2013