Set a TERM handler to terminate properly if running as PID 1