Prevent global leak of `connect`

Without the `var` keyword here, `connect` will leak into the global namespace.