better checking for luabind compilation, fixes some OSX woes

fixes a couple of things on OS X. Will be merged once Windows and Linux CIs build successfully.