Add JError::$legacy check

This should provide cover for earlier versions of Joomla 2.5 which don't
have exceptions