Fix breakage due to change of hash.select API between ruby 1.8 and 1.9