Add some casts to let C++ happily compile jslist.