fixed some compatibility issuses with Joomla! 3.0

Regarding http://stackoverflow.com/questions/15336905

![redj](https://f.cloud.github.com/assets/1197635/245395/284ada42-8a7f-11e2-8a3c-b313575ec57e.png)