smack: minimize ifdef use, and move all labeling to smack-util.c