Bayesian analysis for exponential random graph models