Rami agrees to join Milan - report