Visual Studio 2012 compilation issues fixed.
Merge branch 'FixVSBuild' into develop