add struct flock for osx

addresses but does not solve #129