Apple Apple patches for building on OSX