Previously added patches use str_ends_with(), which is only available in php 8
and newer. This commit adds to the patch a definition of str_ends_with() in the
case it is undefined in an earlier version.
Sponsored by: Rubicon Communications, LLC ("Netgate")