Added makefile for building on linux, fixed some linux compilation errors