Yacc/AIX segfaults if yylen is used instead of strlen(yytext)

(cherry picked from commit 7bff6a73f50b1b1011099828da10275fca11a1dc)