Michigan to pay $87M to replace Flint pipes