I would have reacted the same way that you did: not make a big deal out of it, but also encourage him to be more quiet. If he were to go on and on, then I would be a little more firm and explain my reasoning in that moment. But, I think that you handled the situation well.
I agree that your son needn't bring up other people's private parts, but I would be careful on how you approach the subject with your son. A lot of times, children pick up shame from these kinds of talks...and that shame runs so deeply. Just talk about it seriously, but in a light explanatory tone of voice. (Does that make sense?)