The changes you made now cause the following error when building on GCC 6.2.0:
../../source/as_callfunc.cpp: In function ‘int PrepareSystemFunction(asCScriptFunction*, asSSystemFunctionInterface*, asCScriptEngine*)’:
../../source/as_callfunc.cpp:489:47: error: ‘class asCTypeInfo’ has no member named ‘CastToObjectType’
asSTypeBehaviour *beh = &dt.GetTypeInfo()->CastToObjectType()->beh;
Edit: Changing line 489 to the following fixes it
asSTypeBehaviour *beh = &CastToObjectType(dt.GetTypeInfo())->beh;