Forgot to update the license when I committed the FreeBSD version, so it
still had an old SGI license. Sorry. Sorry.
(cherry picked from dcf6293030 commit)
Add strncasecmp (as we're now using it) in case someone doesn't have it,
and also change strncasecmp args to be const, in accordance with
everything else.
(cherry picked from 11f9e35202 commit)