Optical detection of magnetic resonance measurements of the effects of pH on the triplet states of benzimidazole and purine