refactor luajit detection