Try to handle illegal characters for 1.8.7 while
handling them in 1.9.3+.