Fixes for MacOS

sig_t is already defined in SDKs/MacOSX10.10.sdk/usr/include/sys/signal.h:330:16
mempcpy needs to be defined when building on Mac OS