Improve JavaScript module support