Fixed some unit test issues on Vs2012 only