Fix compiling to JS