Fix potential crash in c_iconv on Mac OS X