added Apple specific getcwd define