replace as_array with toArray()

changed to work with current Osmium, fixes #1