Matched PHP's behaviour for stream type.

Returns the correct value of tcp_socket when HipHopSyntaxEnabled.

Closes issue #2080