Make xe function work under mac osx