Solving Inverse Problems by Joint Posterior Maximization with a VAE Prior