fix Issue 11478 - shared library on osx

- fix incomplete support for shared libraries

[Issue 11478 – shared library on osx: worked in 2.062, fails in 2.063.2, still fails in 2.064](https://d.puremagic.com/issues/show_bug.cgi?id=11478)