compatibility with libjpeg API older than 8.0

provide implementation of jpeg_mem_src if JPEG lib does not come with it