Fart jokes are most likely as old as humanity itself.
In 2008 we could read in the news that the worlds oldest known joke, which was a Sumerian joke from 1900 BC, actually was a fart joke:
Something which has never occurred since time immemorial; a young woman did not fart in her husband's lap
The ancient Greek collection of jokes with the title of Philogelos from around 4th century AD contains several examples
A quick witted captain was asked which kind of winds were expected today. He answered: "Beans and onions".
A man with bad breath met a deaf person and greeted him. "Yuck!", the deaf replies. "What have I said?", asked the man. "You farted!", replied the deaf.
The Philogelos contains an entire chapter on people with bad breath, where a good number of the jokes are about people thinking that someone farted.
The Latin epigrammists and satirists also made several jokes revolving around farts.
For example Catullus (1st century BC) hints in Carmina, 54 that a man named Libo is only ever subtle when he farts. Martial (1st century AD) in his Epigrams, Book IV, 87 writes of a woman that she only volunteers to babysit an infant to disguise her own odorous farts. Horace (1st century BC) in his Sermones, 1.8, 46 describes the god Priapos farting so violently that he literally explodes a fig tree.
I can't provide any good scholarly sources on the subject, although I would not be surprised if they actually do exist (and I would myself be interested in learning about them), but I hope that this brief collection of samples at least gives some support to my claim about the universal nature of the fart joke.