Pascal unit:  allow static linking, use the right calling convention
Fixed a typo