Add libffi and swig support