Modify few makefiles to avoid possible build problems on bsd.