Fix JS_GetArrayElement to not return an empty handle on success