Analysis of gaseous exchange in open-circuit indirect calorimetry