Handle platforms without getprotobyname

Same as the other pull requests :D