fix JNA crash on OSX