I added the patch add-long-varchar-support which I found at http://www.iiug.org/opensource/ "The Open-Source for Informix Project".
We already patched the driver and installed it on our development server. The test script I posted now runs without an error. With this patch it is possible to read data from LVARCHAR columns in Informix with this driver.