stream: fix build with emulated atomics

This code was legal with C11 atomics, but it fails with our
compatibility wrapper.