Modify for mac os x environment.