linux: try epoll_pwait if epoll_wait is missing

It seems that epoll_wait is implemented in glibc in terms of epoll_pwait and
new architectures (like arm64) do not implement the epoll_wait syscall at all.
So if epoll_wait errors with ENOSYS, just call epoll_pwait.

This is a backport of 861de3d71d40bdd22712f0079cd38f41be75010d for v0.10
branch.