fix ldiv for shared libraries
Merge pull request #1969 from WalterBright/fixldiv

fix ldiv for shared libraries