The US president did not rule out negotiations with Tehran