Simplify defines

Change to use better Joomla calls which have true root and avoid
removing /administrator (which may have been changed by some J security
extensions).
Merge pull request #860 from Sophist-UK/simplify_defines

Simplify defines