Have a fallback ready if require('os').tmpdir isn't available.

This adds node.js 0.8 compatibility.