Extend the check for an already existing global JXG namespace to test if this namespace is already populated

If jsxgraph is loaded via loadjsxgraph.js we need to populate the globale JSXGraph namespace defined in loadjsxgraph.js. But if jsxgraph is compiled as an amd module, it is possible that another jsxgraph version is already loaded and we therefore must not re-use the global JXG variable. In this case JXG.extend will already be defined.