make sure that enums are represented as int (technically wrong, but for backwards compatibility; ROOT-6975)