fix const correctness after changing plugin callback prototypes