Fix syntax problems in Config.cmake.
Fix ifdef/elif/elif chain to use if defined(...)/elif defined(...)/...
Define add_flex_target CMake macro.
Get pandaegg to build under CMake.