Generalize logic used to determine support for a codec in IM.