Fix a crash with bfgminer on OS X