Fluorescence lifetime based measurement of pH