Refine port check in webmessaging origin compare.