Fixed segfault on OS X 10.9 due to invalid pointer type.
Added missing include file to post event.
Updated scheduling priority for OS X and x11 hosts to be more posix compatible.  Thread scheduling on OS X should work at this time.