Fix hash ordering dependence in test

Before perl 5.18, 'values %args' happened to return the values in the
right order, but now they are more actively perturbed, so sort them.