Homoclinic bifurcation and the Belyakov degeneracy in a variant of the Romer model of endogenous growth