Using smoothing splines for detecting ventilatory thresholds.