Intensity correlation function for waves of different frequencies propagating through a random medium