Append port to trusted domain in case it's not 80 or 443

Ref https://github.com/owncloud/core/pull/10584#issuecomment-54677059

Backport of 2590a4dc85cb23311a9000770bf506c3953d0b04 from master