move enum outside function (required for gcc 4.1 branch)