Fix util.minibatches to work with lists