When women in these situations make it clear that some behavior is not acceptable, they'll inevitably be met by "Woah don't be so serious, it's just a joke! Lighten up!" And the more upset and determined that woman is to make it clear that something isn't acceptable, the more likely they are to be labeled a bitch.
Because I'd bet you that 90% of the bad behavior you see in that type of situation isn't blatant sexism; it's small "jokes" and "jabs" that all add up to a bad workplace environment for women. And it makes it that much harder to defend yourself when there isn't just one glaring offense that people can blatantly see.
I think making this behavior unacceptable would be helped a lot more if men in the workplace stood up against it. It's not so easy for a woman to do it alone.
I am man, and this sort of culture makes me very uncomfortable and angry. I imagine it's even more aggravating and discomforting to women in these situations.
Simply refraining from laughing at a distasteful joke or turning a blind eye to vulgarities is a cop-out. We are all apart of the culture; if you're not calling this shit out, you might as well be laughing along.
If you see these behaviors, make an example to call that person out. Make it very clear that this behavior is not accepted. Failure to do so is implicit approval.