replace iconv with string.encode for ruby 1.9 support
Merge pull request #6 from nickknw/ruby19