Hydrogenation-induced changes of the crystal structure and magnetic properties of Er2Ni2Sn