Modifying source to build on OS X and iOS