fix gettext memory leaks