config: add flags on lib detection, don't use libpng, libz

Well, that was obvious. Now I just need to use the definitions from config.h for some iffdeffery and build system will be complete. I also need to get Lennard Jones potentials right and that'll be that.