Remove Joomla namespace from sidebar script

This prevents error if core.js is not loaded by defining the Joomla namespace

Solves #5258