Fix use of Luabind classes across shared library boundary.
Fix use of Luabind classes across shared library boundary.

Classes registered with Luabind are only valid within that shared library,
but cause segmentation faults if used across shared library boundaries.

Compare types using typeid(T).name() instead of typeid(T)::operator=.

This fixes use of shared libraries with the GCC 3.0 C++ ABI and loaded
using Lua's require(), which does not pass RTLD_GLOBAL to dlopen.

http://gcc.gnu.org/faq.html#dso

The typeid problem has appeared in other C++ libraries, e.g. boost::any.

https://svn.boost.org/trac/boost/ticket/754
https://svn.boost.org/trac/boost/changeset/56168

Oberon00/luabind,Oberon00/luabind,lonski/luabind