Fix flex for building on Darwin.
Merge pull request #376 from hashdist/johannr/flex-no-undefined

Fix flex for building on Darwin.