I needed these changes to make the example work on Darwin

With these changes everything compiles and runs just fine on Darwin too.