Move flex configuration hackery to flex.hpp