Application of Bayesian model averaging to measurements of the primordial power spectrum