id: fix build
Modify Makefile to build correctly when using BUILD
Merge pull request #326 from Arcterus/id-fix

General fixes