Don't pass globals by reference

https://groups.google.com/forum/#!topic/joomla-dev-framework/ngYzAqZMnSY