added small portability shim for legacy