Fix gettext memory leaks