How about using TEMPLATE_FILTERS and having the mako plugin add them to GLOBAL_CONTEXT? That way it works for both.