improve libffi build