Support for Mac OS X's xattr functions

I've added support for Mac OS X's "mostly the same but slightly annoyingly different" xattr functions. These modifications should only come into play when the __APPLE__ compiler flag is set. Linux should stay unchanged.

I've tested this on OSX and it seems to work well. I will test with Linux and further with OSX, but barring any calamities I think this is done.

Oh, but look into configure.am. I am not very good with autoconf.

Let me know if you see any problems or changes you'd like me to make. Otherwise I'd love to see this in the next release.

Thanks,

Mike.