Fixed compilation problems with gcc 4.6.3; use enum instead of const ints.