Make the test compile and run using FPC.
Small changes in ifdefs needed to use code in both Delphi and FPC.