Barack Obama actually said...
I said in June as the terrorist group ISIL began an advance across Iraq that the United States would be prepared to take targeted military action in Iraq if and when we determined that the situation required it.
Context
Obama explains the rationale for military action against ISIL in Iraq.
08/06/2014