Make MouseDetector a daemon thread so that it exits automatically