Ahmadinejad has gotten more bombastic to provide a distraction from the growing criticism at home that he campaigned on an ability to govern and isn't doing a good job. He's not doing anyone (including his fellow Iranians) any favors by stirring up controversy, but a huge public reaction provides Ahmadinejad with exactly what he's looking for - an international fuss to distract constituents from his domestic failures. A more productive response would be to focus attention back on his problems by saying "if Ahmadinejad is having trouble making big expensive nuclear weapons maybe he could get some extra help from that hundred-mile-long line of unemployed people he promised jobs in 2005".
And Barack Obama gets it. In his first Presidential interview to the UAE news outlet Al Arabiya he says:
...their ideas are bankrupt. There's no actions that they've taken that say a child in the Muslim world is getting a better education because of them, or has better health care because of them. In my inauguration speech, I spoke about: You will be judged on what you've built, not what you've destroyed. And what they've been doing is destroying things. And over time, I think the Muslim world has recognized that that path is leading no place, except more death and destruction.
This is exactly the correct response. Brush "death to America" aside and reframe the issue. You're doing this for your people, right? What else have you done for your people? Why should they support you when you've done nothing for them?
I was also very impressed with the understanding he's demonstrating about Al Qaeda:
"what we need to understand is, is that there are extremist organizations -- whether Muslim or any other faith in the past -- that will use faith as a justification for violence. We cannot paint with a broad brush a faith as a consequence of the violence that is done in that faith's name.
I cannot respect terrorist organizations that would kill innocent civilians and we will hunt them down. But to the broader Muslim world what we are going to be offering is a hand of friendship."
Reframe the issue from "radical muslims" to all people who use faith to justify violence. Stop giving them a reason to think they might as well fight you since you already hate them. Show the non-radical religious people that you don't blame them for the crimes of some other guy.
And separately acknowledging "the Iranian people" and "the Persian civilization" might not register with Americans, but that's the sort of touch that will get people in that country to perk up. He knows there's a difference. He has knowledge which he can use to make decisions. He gets it. Still feeling good about this guy.
Youtube: Part 1, Part 2, transcript.
ps; The phrase "death to America", certainly not a compliment, seems to be exaggerated and poorly translated in the west. Declaring death to things is a common figure of speech not meant to be taken literally. Death to taxes, death to rush hour traffic, etc. It's a statement of exasperation, not a literal deathwish.