Replace all uses of Iconv with String#encode

String#encode is part of the Ruby standard library as of Ruby 1.9
and has replaced the Iconv library. This change breaks support for
Ruby 1.8.