adapt recent Koa API changes