Fixed some regressions for using SLURM < 2.6.

Thanks to @mariogiov for pointing them out.