changes to be robust to emcee versions

It appears that the API for emcee changes from version to version. This commit seems to fix things.