Custom port support (see pull #2778 on AngularJS repo)