Improvement: debian support added

tested on debian squeez, ubuntu will follow
Improvement: two changes from debian build merged in