remove global object when loaded as an AMD module.