Added what appears to allow this to run under swipl.