add code to allow usage without requirejs