Issue
FFI can't be used in static build properly. Any attempt to load dynamic library will throw uncaught error FFI exception. This is probably related to how linking process in libtool using -all-static argument.
Solution
Exact solution was not found yet. Temporarily disable FFI build will be the choice until the solution can be implemented.