provide a VS2012 project and fix 2 compilation issues for VS2012