Libil port for JavaScript (nodejs and browser)