Fix compile error by gcc. Add Bex.test makefile