Merge pull request #16 from qunying/master

merged some patches from debian and change Makefile to fix link error on Slackware