fixed library linking