Merge pull request #37 from antma/master

checks strndup result & enhance configure.ac
restored _GNU_SOURCE for getline in FreeBSD
fix sending a lot of spaces in version string