Measurement of the decoherence function with the MACRO detector at Gran Sasso