Small changes to improve compatibility with older versions of PHP or PCRE