Fix lib order problem on some machines