Reorder libs for static link.