make $items an explicit hashref to hand off to keys()

This is for older versions of perl. Hope this doesn't break newer ones!