Fix build on OSX 10.10

Include headers sys/fcntl.h, sys/socket.h, mach/thread_info.h