Nuclear magnetic resonance studies of wormlike micelles in porous media