g-tensor and spin doubling constant in the 2Σ molecules CN and C2H