fixes for Microsoft VC++ 2012