#1012: RTLD_GLOBAL for casadi module load

See issue tracker for details. This passes all unit tests except typemaps.py
which segfaults, but it also segfaults without this patch so it's a separate
 issue