Made compilable without libtiff,libjpeg and libpng