Updates to work with couchdb 1.4