Represent enums with regular structs; no more alignment-breaking casts.

Fixes #1645.