diff --git a/lib/async.js b/lib/async.js
index <HASH>..<HASH> 100644
--- a/lib/async.js
+++ b/lib/async.js
@@ -683,14 +683,14 @@
     };
 
     // AMD / RequireJS
-    if (typeof define !== 'undefined' && define.amd) {
-        define('async', [], function () {
+    if (typeof root.define !== 'undefined' && root.define.amd) {
+        root.define('async', [], function () {
             return async;
         });
     }
     // Node.js
-    else if (typeof module !== 'undefined' && module.exports) {
-        module.exports = async;
+    else if (typeof root.module !== 'undefined' && root.module.exports) {
+        root.module.exports = async;
     }
     // included directly via <script> tag
     else {
because globals suck :(

I had a bit of a trouble today when I tried to run async in an env where the root wasn't the window.