fixes #5414: Also changed port number when choosing LDAPS