move vm-shim.js to its own lib