Fix an assertion failure on linux

This might seem slightly silly, but this is the code from upstream where the
I/O init code is different, so I will use it like this to avoid future merge conflicts.