Make js compatible with both runtimes (old and new)