Fix compilation Delphi2007 and DelphiXE