Transforming Probabilistic Programs for Model Checking