Problem with computing Hessian in mixed mode (math library)

I found this thread in the discussions which is the most similar to the problem I have:

I wonder if the recommended workaround is still the same as the ones suggested there.