Centralize build flags into cactus_flags; shrink libs (#735)