Rebind M-% to query-replace-regexp.