Replace macros with ConstraintKinds (fixes #48)