Fix compile errors under MS VC++ 2008.