Support accept4().

Resolves #1051