make the daemonize snippet good for both PY2 & PY3.