Various changes to make compilation less painful on linux

These things make Sigma compile on my debian machine.