Various patches, to enable Asterisk to once again compile on Mac OS X.