Problem with model{} block when switching from 2.2.1 to 2.4

I have a similar issue:
C plugin error in 2.4