Visual Studio 2013 Workarounds

These changes allows the code to build and run on Visual Studio 2013.