support for Visual Studio 2008 and older

Added fixes to support Microsoft Visual Studio prior 2010