Makefiles: Enable "dist-hook-git" check only when GNU make is in use.