Improved native lib loading