Redo check for pcreposix library.

Other check was broken, it did not set PCRE_STATIC when necessary nor did it add needed PCREPOSIX_LIBRARIES
for Visual Studio build.