fixed to compile with other libjpeg versions