Keeping a positive carbon balance under adverse conditions: responses of photosynthesis and respiration to water stress