Fix enrolment on non-standard ports.

This isn't the right jira issue, but jira is down...

Jira issue: WP-852
Merge pull request #16 from jplyle/enrolment-port-fix

Fix enrolment on non-standard ports.