fix interface to TObject cast for FPC