Fix builds for MSVC 2003 (#4761)