Change ordering of libraries to check for POSIX regular expression support.

New ordering is now LIBC followed by LIBREGEX followed by LIBPCREPOSIX.