A source of reference is nompuq, but I'm not sure that's the right word to use here. There's also the word mung meaning "origin", so you might say for instance:
mu'tlheghvam mung vISov/vIyaj. ("I know/understand the origin of this sentence.")
You might also use the word ghov ("recognize"):
qIDvam vIghov. ("I recognize this joke.")
I get that a lot too - and I take great pride in it as well. :)
When I was living in Germany when I was younger, most people were surprised to learn that I was a foreigner, as I spoke German well, with only a very slight accent. Usually, they guessed I was either Polish or French. When I finally did tell them I was American, the usual reaction was shock and surprise, followed by some variation on "But you CAN'T possibly be American. You speak German so well!" Kind of the same idea as the original joke.
For the record, as a non-American, I don't approve of people dissing Americans as a group ... although it can be quite fun to tease the ones you're on good terms with ;)
I had a similar experience in Japan, last week, as knowing pretty much any amount of Japanese is considered pretty much god-tier over there :P