Fix building grub.cfg file when in EFI mode