bugfix: build problems with lexer.l on some platforms

For some reason, the strdup() prototype and others are missing. I admit
that I don't know why, as this happens only in 8.3.0+ and there is no
indication of changes to the affected files. In any case, we need to
fix this, and the current solution works at least as an interim one.