Celtic captain Callum McGregor strikes to equalises against Hearts after the home side took an early lead.