Cleanups for OS X support