add Makefile that simpliefies running stuff
compile gtest with pthread when on Linux
avoid invalid conversion