ExternalProject: Only add git config setting with git 1.7.7 or later
1cb65e68 (ExternalProject: Prevent the noisy detached head messages on checkout, 2021-01-17) unconditionally added the advice.detachedHead git config setting, but it requires git 1.7.7 or later. Since it isn't fatal to not have it, just noisier, only add it when it is supported.
Fixes: #22206 (closed)
Backport: release