Pentagon: Pakistani intelligence has ties to terrorist groups