Made compatibility to Joomla 1.6 or above