Change configure to allow statically linking libpcre.

Statically linking libpcre requires using -pthread, which is added
when building Suricata, but not while checking for libpcre in configure.

Passes PR Script:
https://buildbot.suricata-ids.org/builders/ken-tilera-pcap/builds/61
https://buildbot.suricata-ids.org/builders/ken-tilera/builds/127