lib: Convert runtime.js to CoffeeScript