Fix segmentation fault when invoking __callStatic()