Every once in a while I have this problem, I find that if you start by trying force your way out your opponent has the automatic tendency to bring the legs up for a triangle. If you grab and control one of the legs there is a nasty leg lock that can come out of it.
As for just passing the guard, the best time to do that is in the initial takedown. Use takedowns that will put you in sidecontrol. The other side of that is, if you are going for a double leg, to swing your legs through the guard really quickly.