BZ-8623: set the cookie domain explicitly to '.<hostname>' if it isn't
set by the caller.