fixed linking order and removed unnecessary install_name_tool invocation