2.2/develop

Hi, please don't accept this pull request as is, as It's breaking compatibility with pyrocms 2.1. I don't know of an easy/classy way to support both version simultaneously, but I wanted to show what's needed to have it work.