removed JFactory::getDocument from system plugin - appears to cause issues with requests for other document types than html