Makfile modification for lua 5.2 and to fix compile errors on linux

The changes that I consider important are in Makefile.debian line 36 and 52.   I had compilation errors due to gcc as-needed lib loading (so having $LDFLAGS after $OBJECTS helps, also moving -lm to the end and adding -ldl helped the rest of the compilation issues)

The other changes are optional for main repo: 
Support lua 5.2 by default.   
../somedir to ./somedir changes I hope make sense because all the dirs referred to with ../somedir are actually a level above from Makefile.