function findCloseButton() {
          return element[0].querySelector('.dialog-close, md-dialog-actions button:last-child');
        }
If no element with class dialog-close, try to find the last
button child in md-dialog-actions and assume it is a close button.

If we find no actions at all, log a warning to the console.