U.S. stocks gave back early gains on Thursday, erasing a morning rally that had pushed the Nasdaq Composite above 2%.