If someone asks you to explain a joke I think you should just explain it and be nice. It should be more socially acceptable to ask for a joke to be explained and people who groan and shout "now it's ruined" need to stop.
In fact, some jokes become more funny when they are carefully explained, especially if you try to be very neutral and clinical about it. "And you see, it is humorous that..." give it a try!