West Indies' fifth-wicket pair put on unbroken stand of 174 to remove peril from situation