I see the PR is changing the prototype of ki_jwt_generate() function by adding a new parameter. However that is exported to KEMI and expects the same number of parameters as so far.
You can rename ki_jwt_generate() to ki_jwt_generate_hdrs() and add the new parameter, then re-add ki_jwt_generate() as a wrapper to ki_jwt_generate_hdrs() calling it with the new parameter being NULL.