If he's some punk stranger who you'll never see again I'd just flatly say "thanks" and roll on. Your smirk and nod is practically the same thing.
If he had known her then you may want to be more sly with the response.
If he had known her then you may want to be more sly with the response.