Fix for Dancer2 >= 0.149000_01

This should make it work for Dancer2 >= 0.149000_01.

Unfortunately it's not released yet. Would it be possible to release a dev release of this? It could be updated along with Dancer2, which will probably see a stable coming in the next week or two - or do you prefer to wait?