Fix bug where jQuery was inserted even if not needed in Joomla 3.x