Liberals survive confidence vote, avert imminent election with NDP help