I don't comment. I just walk away. Most people are embarrassed when it happens, so your laughter probably offers some level of comfort.
Some cultures think this is totally fine. It is a "natural" bodily function. I just walk away because I don't want to be next to the person with that odor up my nose.
Some people are just rude and pop them out because they like the attention. I find myself squinting my eyes at them, still just walking away.
A lot of people do laugh, but I don't remember ever laughing at something like that. I'm overly concerned about how I'm going to avoid the smell. To me it is rated the same as second hand smoke.