This is not considered a "backpass" offence.
However, by attempting to circumvent the restriction on the goalkeeper handling the ball after it has been deliberately kicked to him by the defender, the defender has committed an act of trickery. It is irrelevant as to whether the goalkeeper ends up handling the ball.
As soon as the defender heads the ball towards the goalkeeper, play should be stopped and the defender should be cautioned for unsporting behaviour. The restart is an indirect free kick to the opponents from where the defender was standing when they headed the ball towards the goalkeeper.
The relevant section in the 2014/15 FIFA Laws of the Game is on p. 123:
Cautions for unsporting behaviour
There are different circumstances when a player must be cautioned for unsporting behaviour, e.g. if a player:
...uses a deliberate trick while the ball is in play to pass the ball to his own goalkeeper with his head, chest, knee,...