Helper method to get root view controller from nav controller.