Applies the code included in the ticket #4 for the 1k buffer issue

Hi willem4ever and theOzzieRat,
Thank you for your great work.
This is a pull request for applying theOzzieRat's patch.
(https://github.com/willem4ever/mod_websocket_mosquitto/issues/4)

I compiled it on Ubuntu 12.04. Please review the patch on your box.

daisuke