Made (make|compile)messages check for availability of gettext commands.

Refs #19584.