HPCC-9890 Dynamic loading assumes .so extension (so can fail on OSX)

The code should have been using the defines from platform.h.

It was also very sloppy in the assumptions about when and where to add the lib
prefix.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #4754 from richardkchapman/no-so-append

HPCC-9890 Dynamic loading assumes .so extension (so can fail on OSX)

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>