Make the LuaJIT stuff work on Darwin/Mac OS X again.

We were sloppy about using SHLDFLAGS when building modules
and the flags needed to luajit on Darwin require special
flags that differ between building executables and bundles.

Fix up SHLDFLAGS on Darwin and make sure we use them.