discover/grub2: Fixes for bison 3.x