MT#9579 ngcp-sync-constants: fix check for master host

Previously we were using the IP not the hostname

Backporting to mr3.5 from trunk, otherwise upgrade mr3.4->mr3.5 is broken:
> sp2 not found at /var/lib/mysql/master.info. Fix replication manually

Change-Id: I48e2bb57da5ac32879d11ca51dd675db2b817ba6
(cherry picked from commit 10ea8aba6987187332e72482e196c6dab034af2c)