Fix gettext version mismatch

Import two patches from upstream to fix the following issue.
When building testapps I have stumbled upon a build problem in json-glib:

*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version 0.18 but the autoconf macros are from gettext version 0.17

These two commits allow my build to continue.