handle deprecated classnames when setting title.

I'm not a huge fan of this patch, but it looks to work pretty well considering the minor issue referenced in #2. Do with it what you may.

I think the longer term solution should be to fork off multiple versions: One for BS2 and another for BS3.