Add autoloading library aliasing support (supersedes PR #2824)