Make it compile on OS X.

`SIGWINCH` is undefined on OS X if `_POSIX_C_SOURCE` is defined.  This
is correct behavior (see
<http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_02_01_01>).

The standard allows for enabling other feature test macros in order to
make these additional symbols visible.  On OS X in particular,
`SIGWINCH` is defined when `_DARWIN_C_SOURCE` is defined.

The compilation script is extended to support platform specific
variations.  If `script/compile-$PLATFORM` exists, it is used for
compilation instead of `script/compile`.  The value of `$PLATFORM` is
the output of `uname -s` converted to lower case letter, e.g. `darwin`
when compiling on OS X.