sl2: Make defines and transforms pure.

They should be, and this should help make more things const.