AT&T agrees to buy DirecTV in $48.5B deal