tests/synctest: allow it to be built with debug symbols

And small fixes to make it run properly under GDB.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Merge pull request #203 from clebergnu/synctest-gdb

tests/synctest: allow it to be built with debug symbols