Fix shutdown when run as Windows service

patch by jmckenzie, reviewed by pthompson for CASSANDRA-8136