Fix iconv memory leak