A frog in my throat

Where does the saying "I have a frog in my throat" come from?

I understood that the coughing which gives rise to the use of the phrase is somehow supposed to resemble the croaking of a frog. (Don't get it myself, though.)

DFG