Measurement of the formation rate of muonic hydrogen molecules