adapted OpenFOAM export to versions 2.1 and greater