Change API to make it possible to run on Darwin.