some changes in passport.js to make mocha happy