Measurement of deeply virtual Compton scattering at HERA