changes to make things work on darwin