Support basic JS build
Work around scala-js bug