Allow compilation with gcc < 4.8

Those seem to assume that enums are unsigned by default so comparisons
like "< 0" cause a warning == error.