Added makefile and fixes to compile without c++11