Gamma-ray burst host galaxies at low and high redshift