linker fixes, esp. for darwin

potion-s use static objs
dll: use proper install_name