Fix problems with binary/utf strings on Ruby 2.0