try to fix lua compile and link problems without breaking ubuntu