Dancer 2 compatibility

This patch allows your module to run with both Dancer 2 and Dancer 1.

Can you review the changes and build a new release for CPAN?

Thanks a lot.