Revert "remove libffi"

This reverts commit fcb2595c5c3e8ff0377fc26382472dc37675d39c.