Generalize logic used to determine support for a codec in IM.
Merge pull request #52 from adam-vessey/7.x

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