A growth model for a two-sector economy with endogenous productivity