We can't have functions on compounds as all files for them are generated. Removed CalcNumTriangles so Niflib programs will link.