Port JavaScript module infrastructure