Fix conversion-loss warnings

Fix "implicit conversion loses integer precision" warnings by changing int to NSInteger (long)
Merge pull request #7 from clemensg/patch-1

Fix conversion-loss warnings