ESR study of structural changes in chalcogenide glasses