Fixed for Ruby 2.0

Checks if String objects have a `.b` method (added in 2.0) so a binary version is used for comparison.

All tests pass in ruby 1.8.7, 1.9.3 and 2.0.0.