Fixed loading of shared libraries