new improved dynamic native library loading method