Native OS module API shim for older node.js versions