adapt libSBML 4.x.y/5.x.y API changes

Now it compiles with libSBML 3.4.1, 4.3.1 and 5.10.2.