unix, windows: map ENOPROTOOPT errno

Fixes #1143