Fix libffi usage when it is on a custom path.