Fix compatibility with newer libffi on Windows/MSVC

This allows users to provide their own version of libffi instead of always using the bundled version. Newer libffi also implies linking against a DLL on Windows, but we currently link statically for the extension.