Use external libpng and zlib.
Use external GLUT library.
Fix file extension of triangle.c.
Fix compilation on 64-bit systems.

I'm not crazy about this use of pointers as keys, but it seems to be
okay for the time being. One or two don't make sense, though, so I've
made a comment about that in the code.