Make backward compatible to Ruby 1.9.3

String in Ruby 1.9.3 does not have bytes method.  Ruby 2.x and later does.
Merge pull request #1 from dcollins991/master

Make backward compatible to Ruby 1.9.3