Small fixes to allow compilation in Dellphi 5 with ENTERPRISE define enabled and other small tunnings