Porting to use MSVC 2010 compiler