wait2: allow passing timeout argument (python 3.3+)