Sit down and talk with the boss. Sure, he may find it harder to intervene when it's a friend, but he may also have a lot more leverage over a friend than he would over an average employee - namely, the threat of shaming among their shared friends.
The problem I'm having with it is he has to know this guy does this. It's not exactly subtle or I likely would not have noticed. He's been in the room before when it happened, and the two of them go out for drinks on Fridays and such all the time. I think it is not a problem for him or he would have pulled the guy aside and told him.
He may be in denial about other people's perceptions. You talked about bringing it up after you have an escape plan - make sure you're bringing it up with the boss too.
That's my plan actually. Once I have nothing to lose I'm going to tell the guy he's being an asshole to the women engineers and ask if he'd consider not doing that because it's a shitty way to treat anyone. Preferably with boss present.