Fix building without regex support
Consolidate regcomp check

Use cleaner C in the check for whether `regcomp()` works, in case the
user has strong error flags in his CFLAGS:

* Use a proper signature for `main()`
* Don't use undeclared functions.
Merge pull request #103 from b4n/consolidate-regcomp-check

Consolidate regcomp check