Fix tests when running under Jenkins