fix gen.next(val) for latest v8. Closes #8
Release 1.4.1