Changed the way core lua libraries are loadedwfixing a segfault