Fixes for msvc2008