Adding -lffi to shared library flags.