Work on OS X socket support