Set stream type for sockets.

Fixes a test case in ReactPHP.