msvc11 build fixes