Hack for Chrome window close

On some versions of Chrome javascript window.close() doesn't work.
It was spotted on Chrome v23 runnning on Ubuntu