Support both `realpath` and `grealpath`