Fix compiler warnings for MSVC 2008