Only use EPROTO if it's available.

This unbreaks the build on OpenBSD which lacks EPROTO.

(cherry picked from commit f20f621e82a0399522a265f7d4a9392d14328399)