make #8784 work on Mac