Fixed compile errors due to insufficient C++ support in Visual Studio 2012