Fix spec failures in Ruby 1.8.7