Fix doth test when curl without HTTP/2 support is unavailable

This commit makes the 'doth' system test skip HTTP headers check when
curl version is new enough but was compiled without HTTP/2 support.

This should fix the 'doth' system test for macOS systems using
68 jobs for !5585 with 3019-curl-check-http2-features in 27 minutes and 40 seconds (queued for 13 seconds)
latest merge request