True, but unwelcome is key. How do you know if a remark is unwelcome? Someone tells you so -- either the offended or HR (whom the offended told). They don't post it on Twitter or blog about it, they talk about it with people in a position to correct the problem.
I know plenty of women who wouldn't feel the least bit offended by a dongle joke -- point being, you can't say "well there's a woman in earshot, better turn on the woman filter."
Personally I believe you should make an honest effort to behave professionally, especially in the presence of folks you don't know, but different folks have different yardsticks for this. That's why you communicate.