It may be a perfectly reasonable interpretation, but it isn't the rules as written. It isn't a melee attack and the creature lacks any "use ranged attack for AoO" feats or abilities. A GM may decide the make the ruling, and I can certainly see the logic, but it isn't RAW.