Measurement of elastic J/upsilon photoproduction at HERA