Generation of surface electromagnetic waves in terahertz spectral range by free-electron laser radiation and their refractive index determination