The president put a twist on one of his classic speech anecdotes.