Measurement of jet fragmentation into charged particles in pp and PbPb collisions at root s(NN)=2.76 TeV