Workaround for problem with Hash#sort_by on Rubinius