Fix type signatures in BNFC.Utils