Change dynamic lib according to architecture
Fix issues on juju home directory