No se puede, viene en la documentación de
MDN:
Cita: This method is only allowed to be called for windows that were opened by a script using the window.open() method. If the window was not opened by a script, the following error appears in the JavaScript Console: Scripts may not close windows that were not opened by script.
Al parecer si que existe
este "workaround" (el que tu usas) pero como ya comentaste solo sirve para IE y Chrome.
Lo siento