US Secretary of State John Kerry says he’s open to working with Iran to defeat rebels in Iraq and wouldn’t rule out military cooperation.