WASM support

The jsMain should be changed to webMain and a shared implementation for JS and WASM should be used.

This is easily possible by replacing existing JS API calls using kotlinx-browser.