libffi: produce portable library, enable doCheck

Thanks to #907.