Improved building without git and added NO_GIT make flag