I could not find a way to do this easily, so I wrote a small R package. The package is not thoroughly tested but works for the cases I have tried. It's available here: https://github.com/koekvall/predglmm