Fix bug where dialogs with history disabled were getting closed by $.modalDialog.enableHistory()