Compile sync_server with thread safe spirit.