Add support for caching on OSX/BSD