I don't know if this will work, but no one else has replied so I might as
well make a suggestion!
perhaps if you put in an explicit path to the libraries included in the
amber distribution, and then compiled them yourself using the same compiler
as you intend to use for the rest of the installation.

A second option which would probably work as a bit of a sneaky workaround
would be to copy the relevant source code into the sander directory and let
the compiler link it in all on it's own.