fix ldiv for shared libraries