Fix some issues with compile flags
Manage luajit dependencies