pcre: check for pcre_free_study, fall back to pcre_free if it unavailable