Also: If you feel that your opponent has already started to hug both your legs and starting to pass: do the "Switch". Let's say your opponent passes your legs to the left (since he's hugging both your legs, he'll have a pretty low posture). Then take your Right hand and post it on his inner right thigh (i.e. grab his right leg). Then try get on all fours and take his back.
It's not always gonna work, but if he's already locked your legs, there's not much more you can do.
The switch was one of the few things I learned in my short stint in high school wrestling. I sucked at it but I'll give it a try. Never thought of using it in this situation.