Melvin de Leeuw and Richard Brittain scored in the last few minutes to give Ross County a 2-1 victory over Hearts in the Scottish Premiership.