fix static assertion problem for gcc (bug 4022)