US threatens Iran over attacks on military bases in Iraq