Protecting against exceptions when setting stream timeout

Adding checks to CanTimeout in case a particular platform doesn't support setting the timeout on streams.