Barry Ferguson's Rangers came back from 2-0 down to take all three points against Kilmarnock in his first game in charge.