lazy class loading for PtyProcess (r=Eugene.Zhuravlev)
(cherry picked from commit 96c8bca)