Improve building scripts

1. add luajit, glfw compile scripts
2. let it build in release mode on default
3. adjust the system to meet some special build system, like LuaJIT. The original export of CFLAGS and LDFLAGS, CC etc environment in `build.sh` will be conflict with the build system of LuaJIT.