Support OS X

Not sure if this is the right way to do it, but it seems to work fine. I've tested with the sample filesystem, and with another I'm trying to write myself (https://github.com/kvs/passfs)