Make some changes to support Ruby 2.1

`iconv` is deprecated in Ruby 2; these changes get the gem working once more.