Fix compilation on Mac OS X.
Fix compilation on Mac OS X.

This is a quick fix.  We should really check feature availability
macros, such as _POSIX_C_SOURCE.

This change was imported from the Speech Dispatcher project.
It combines the following two commits:
71f9fe5ad4ebb5d94faa630b6d5372892ed9d3a7 and
de2c285e02e4305eb15017bc8d9e58ef7c3a273d.
The author of the first commit is Boris Dusek
<dusek@brailcom.org>, and the author of the second commit is
Hynek Hanke <hanke@brailcom.org>.

razr/opentts,razr/opentts,razr/opentts,razr/opentts