io: allow overriding poll function.