Expose quit to JS.