Using OJPEG is strongly discouraged for more than 20 years already (since June 3, 1992). And there is a reason for this: the OJPEG spec is misleading in many ways and almost every compressor implemented the spec wrong.
You might want to change your requirements. If there is absolutely no other ways then you might try and implement some code that just glues given files together.
It should not be very hard (you will need to copy images into one file and update directory chain accordingly). Anyway, it might be very frustrating experience, especially if files you should deal with are coming from different compressors.