libffi: Add --HEAD option

Closes #30116.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>