Foreign governments seek emergency exits for nationals stranded in Iran and Israel