Possible fix for the packet issue introduced in PHP 5.5

Probably not the best fix(maybe it is,I don't know), but it seems to work great for me.