prefer enum rather than #define

The enum value names are visible when debuging with gdb, while defines
are mysterious constants without a trace where they came.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>