Rangers fend off elimination, top Penguins 5-1