make (mostly) compatible with OSX 10.9 Mavericks