Fix for undefined window.Modal.