Only include signal blocking and polling on appropriate (unix-like) platforms.

Change the requirements for using sigtimedwait() from __linux__ to
_POSIX_REALTIME_SIGNALS. For all platforms without this macro defined, that are
also non-apple, do not perform any signal polling.