Fix library link order