Analysis of integrated spectra of red star clusters in the Magellanic Clouds