Add waffle support for toggling features

Fixes bug 2992