bugfix for issue #59, update threading for use with latest glib (2.42)

has been tested and found to be working (at least for svn and git repositories) with both
* libglib2.0-0:amd64 2.40.0-5 and 2.42.0-1
* libglib2.0-bin:amd64 2.40.0-5 and 2.42.0-1
* libglib2.0-dev:amd64 2.40.0-5 and 2.42.0-1