kvargs: fix crash when parsing an invalid token on freebsd