restore functionality

Sorry for the noise, this is a bugfix for the last round of changes wrt. mongodb URI support.

I don't know if it is possible to make pull requests for specific commits - Github seems to insist on including all those merge commits etc. :(

/Fredrik