Finally made it compile and run on Linux