fixed missing variable declaration

The missing var declaration will cause errors with minifiers like
uglify2.