improve mac build scripts
make curl compile correctly
make glfw work on mac
add lua mac support