Set dynamic library path on Windows/OSX before running system tests.

Ensures that the tests find the correct Mantid libraries and 3rd party
components.
Refs #10816
Merge branch 'bugfix/10816_fix_loader_search_path' into develop