Make session cookie stripping compatible with both Laravel 4.0 (via "close" global event) and 4.1 (as a middleware).