Fix incorrect native library path being used on some platforms.