fix compilation and packaging on linux