Support mounted app as any argument to app.use()

fixes #2277