Refactor Xcode/CLT version checks
gphoto2 2.5.2

Closes #19954.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>