Close the window when the last tab is closed.