The issue is with the include flag. Without it the png will fail to build. Since I am overriding this part, I had to include the LDFLAGS part as well.

P.S. Fixing https://github.com/hashdist/hashdist/issues/132 would greatly help with issues like this one. ;)