Fix undeterministic spec failures under ruby 1.8.7

Ruby 1.8.7 does not return the keys of a hash in insertion order.
Instead the order is more or less random, so use the correct matcher to
check the keys of a hash