Merge pull request #159 from tedu/master

fix some 64-bit types
openbsd has getdents