[configure] Improve auto::libffi probe

Apply patch by pstumpf [GH #1030] to fix a failing probe
with -fstack-protector-all or -fstack-protector-strong with
recent GCC and OpenBSD’s toolchain.
Analysed by Martynas Venckus.