Ailing top seed Medvedev toils into Miami Open fourth round