AT&T to buy AppNexus ad platform