explicit cast NSUInteger (unsigned long) to int

fix a warning in Xcode 6.1 for explicit conversion from NSUInteger
(which is equivalent of unsigned long) to JavaScript compatible int.
I’m guessing this would not commonly overflow since it is a count of
visible objects, so less than 2 billion
Merge pull request #1 from sventech/master

explicit cast NSUInteger (unsigned long) to int