Adapt peres for the new libpe.