Characterization of hydrogels using nuclear magnetic resonance spectroscopy.