Endogenous Commodity Policies and the Social Benefits from Public Research Expenditures