Development of compact optical oxygen and carbon dioxide gas sensors for portable metabolic analyzers