How the U.S. and Iran found common interests in unlikely places