MFC 250053:
Only cleanup CMI-related state on detach if the system supports CMI.