lua: build differently for Darwin and Linux

Signed-off-by: David Abdurachmanov <davidlt@cern.ch>