Add configure check for setenv() POSIX function.
Only build replacement BSD setenv/putenv/unsetenv on systems that don't provide POSIX setenv.

This fixes building on OS X, where shared libraries cannot directly access
environ (compat.o is built into some plugins).  See https://github.com/BitchX/BitchX/pull/8.

Reported-By: mistydemeo
Apply FreeBSD 10 build fixes to macros/pluginsupport.m4 and regenerate aclocal.m4.
Reinstate CYGWIN test for build paths and regenerate configure.

If we change the default CYGWIN paths it will be a backwards-incompatible
change for existing setups.
Merge pull request #9 from keaston/master

Only build and use BSD setenv implementation where POSIX setenv() is not available.