chroot: make it compatible with older versions of zsh

The `=~` was introduced some years ago. Replace with `-regex-match`
which exists since a long time.