Fix hostname lookup on iOS