A model of endogenous political party platforms