More fixes to build with Visual C++ 2010