A calibration procedure for the response of silicon surface-barrier detectors to heavy ions