Compilation fix and example projects for Visual Studio 2012