Replacing Iconv for String#encode to be Ruby 2.0 compatible