Minor fixes to support MSVC10 compiling.