Replacing jexit() with a forwards-compatible JFactory::getApplication()->close() call