Configure doesn't detect ffi without -pthread.