Carbonaceous dust grains seen in the first billion years of cosmic time