Fix Delphi 7 compatibility