A method of measuring the neutron energy spectrum by activation detectors