Fix broken support for OS X