Israel agrees to release Palestinian prisoners