Bug fix for #2334.

Hi @aronasorman here's the PR for #2334 - Cannot sync server on Mac to central server.

As mentioned, this fix should apply for the other branches as well.

It's been failing on my fork on Travis so if this fails, will have to attempt to pass Travis.