Handle os.tmpDir for older versions of node (works in 0.8)

With this change, the module works in Node 0.8.8 for me.