Replicating Node.js module loading system so using it is transparent when using pure Javascript modules within thread contexts.