libffi: fix problems with gcc-4.0 on 32-bit Mac OS X

Based in part on https://trac.macports.org/changeset/122079