Fixed #23788 (2) -- Improved gettext version checker

Thanks Tim Graham for the report and initial patch.