Fixed Delphi 2007 compilation