Improve the iconv detection process

See the individual commit messages below for details.

/cc @flavorjones, @tenderlove