Fixes for libspatialite 4.1.x and dynamic linking