Use an enum class.

Might also fix the windows build.