build: add release and debug targets + tweaks

OSX needs the extra link-time switches for LuaJIT, so I thought I'd enable
them as well to see if it fixes the "immediate float value is not correct"
problem I'd been having.