Prior distributions from pseudo-likelihoods in the presence of nuisance parameters