Inverse Ising problem in continuous time: A latent variable approach