Pass proper size to swprintf

Prior to this commit, the total bytes size was being passed, rather than the
remaining character count

Signed-off-by: Morten Hustveit <mortehu@google.com>
Moved libries from _LDFLAGS to _LDADD

Signed-off-by: Morten Hustveit <mortehu@google.com>