An attempt to import older Scriptish code for ease of Fennec support