Kilmarnock come from behind at Tynecastle to earn a Scottish Premiership win and hand new head coach Neil Critchley his first defeat as Hearts head coach.