using AMD only if it is in use, otherwise fallback to global namespace;