Fix bug in class comparison when unregistering MIME type registrations. fixes #1406