add struct flock for osx
Merge pull request #130 from lipp/add-struct-flock-osx

add struct flock for osx