Fixes/workarounds for MSVC 2010