Ahmadinejad’s victory confounded Washington’s calculations