Early evolution of the histidine biosynthetic pathway