DESTDIR compatibility + custom flags compatibility + LuaJIT compatibility

Signed-off-by: Vadim A. Misbakh-Soloviov <mva@mva.name>