(daleharvey/pouchdb#1387) - prototype based plugin api