add support for pyramid_mako and pyramid >= 1.5