Fix shared library linkage for native builds