fix flock errno under osx