Workaround for Hash.select in Ruby 1.8