Makefile: fix checking whether reconfiguring is required