Fix for traceback on OSX.  Fixes Bitmessage/PyBitmessage#401

Fixes issue Bitmessage/PyBitmessage#401 where we get a traceback in OSX.