This is covered on synergy's support Q&A site
In detail, you want to set up the laptop and mac to use a different IP address range - in your shoes I'd go with a simple static IP address on either side, then tell the systems to connect using those IP addresses, rather than the hostnames.