Adopt recent changes for OSX