Synthesis of N-vinylcaprolactam polymers in water-containing media