Djokovic ‘lucky’ after narrowly missing linesman