Use enum class instead of old enum.

As we are relying on c++11x for other stuff too.