Method and apparatus for thermal control in a fuel cell