This is a quick port of libffi. Untested, but as no changes were made to the code there is no reason why it shouldn't work.