Use %= instead of %d to print enum/flag values.

This is because they might be a <machine-word> rather than an
<integer> if the value is large enough (particularly on 32 bit
platforms).