Make the Websockets example compile on Mac OS X, along with some other little patches.