Fixes for MS VC 2010 compilation.