Fix build errors with ondemand slave

Add back the stopOnTerminate parameter to the constructor