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.

-----
BTW, now I have push rights here, do you want me to push these kind of stuff right away or still use PR as a review process?