twinkle: fix build (fixes #3673)

Pulled patches from Debian and hacked around linking errors.
I'm able to ring my mobile phone now.
However, on exit the process is stuck and needs kill -9.

CC: maintainer @MarcWeber.
(cherry picked from commit c198a3689890e5b9395480aaae644acd7d3bd675)

Conflicts (trivial):
	pkgs/applications/networking/instant-messengers/twinkle/default.nix