Fixes for MSVC 2010