Fix for SWI-Prolog/pengines#8