Fix openbsd builds and require flex 2.5.9 or above