Fix building without regex support

`regexAvailable` has to be defined outside `HAVE_REGEX`