few changes to compile on linux