More robust interface to external solvers.

Addresses #86