Time-gated fluorescence spectroscopy and imaging of porphyrins and phthalocyanines