Linear response theory for systems obeying the master equation