Changed to export globally if amd is not in use