Fixed the indexOf/lastIndexOf's bug in array.js.