Hmm. Looks like it'll be a 5 line patch to fix that. Something like (the 5 lines plus the rest of the define):
#if defined(__APPLE__)
#include
#define bswap_16 OSSwapInt16
#define bswap_32 OSSwapInt32
#define bswap_64 OSSwapInt64
#elif ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
#define WANT_BUILTIN_BSWAP
#else
#include
#endif
Taken from XOrg, which had the same problem on OSX.
...and I think jgarzik's solution needs to be massaged into the OSX code above for maximum cleanliness!