Workaround for systems without getprotobyn* (e.g. android)