Implementing closures and first-class functions in WebAssembly