contrib/configure: match exactly protoc version for versions before 3.22.0
We need to change the contribs otherwise protoc won't be rebuild in some cases (for example 3.21.12 vs 3.21.2) and considered incompatible in configure.
Fixes #28865 except for 22.0 which has a protobuf version of "4.22.0" instead of "22.0.0", so it's not between 22.0 and 22.1.