Allow return statement with no value in a generator function

Fix #1586