NIHAO X: reconciling the local galaxy velocity function with cold dark matter via mock H i observations