Move Lua 5.1 compatibility macros into a separate header file