fixed Delphi 2007+ compilation issue