Fix failed specs on Ruby 1.8.7

No idea if you still want to support Ruby 1.8.7, but if you do you'll need this to make the specs pass.