Fix implementation of io_control() so that it adheres to the type requirements for IoControlCommand. Fixes #2820.