Makefile: Improve compiler header dependency check