Fix MediaStore parsing in Javascript