Pass the object, to make it available to theming.
Merge pull request #51 from adam-vessey/7.x

Pass the object, to make it available to theming.
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.