getlantern/lantern#1941 Cherry picked updated masquerades.go