[engine] Implement require() for embedded JS modules