Optionally use libffi to implement 'foreign import "wrapper"' (#793)