Various minor OSX fixes