added directories to native library search path on posix + minor tidy up