Updated for current PouchDB api
Merge pull request #1512 from joeriks/master

Updated for current PouchDB api