Merge pull request #6 from braiins/master

Makefile fix
Move pthread to the end
c++ Makefile - prevent overriding of CXXFLAGS and LDFLAGS

- the changes to the respective flags should be made with append
  operation. This prevents breaking/removing any default flags
  supplied by an external build system (e.g. distribution specifici
  package build system)