SDL: support libpng and libjpeg