autotools: Improve iconv check Use a custom test program which includes iconv.h, so we can check whether the possibly redefined symbols in this header file match the symbols in the iconv library. Should fix #547.