Simply changing mozjs-78 to mozjs-91 in configure.ac is enough to make compilation fine. Unfortunately, the test suite fails because in the destruction of global
gHelperThreadLock in mozjs-91, it calls
pthread_mutex_destroy on a locked mutex, which is an undefined behavior and leads to crash.
I'm not sure how to fix this problem.