Minor fixes for Visual C++ 2010 build