Use gnulib's iconv module to paper over some cracks, and remove some out-of-date workarounds