qt5.rb: remove libpng and libjpeg dependencies

This allow compiler to link against bundled `libpng` and `libjpeg` libraries.

Fixes #21254.