Measurement of the t distribution in diffractive photoproduction at HERA