Determination of carbon dioxide in rock analysis by non-aqueous titration