Demand-led growth with endogenous innovation