diff --git a/lib/connect-mongo.js b/lib/connect-mongo.js
index <HASH>..<HASH> 100755
--- a/lib/connect-mongo.js
+++ b/lib/connect-mongo.js
@@ -146,9 +146,13 @@ module.exports = function(connect) {
           break;
 
         case 'interval':
-          setInterval(function () {
+          self.timer = setInterval(function () {
             self.collection.remove({ expires: { $lt: new Date() } }, { w: 0 });
           }, options.autoRemoveInterval * 1000 * 60);
+          // node <0.8 compatibility
+          if (typeof self.timer.unref === 'function') {
+            self.timer.unref();
+          }
           changeState('connected');
           break;
Exposing timer as self.timer. Added timer.unref()