Obama says Syria deal could offer lesson for Iran talks