Fix 'unknown pragma' warnings with MSVC 9

#pragma detect_mismatch is only supported since MSVC 10.