register as a browser global or an AMD module