Fix dependency generation with ccache/gcc