Mass-spectrometry method of studying the thermal degradation of polymers☆