Updated createLocals for Express 4 support