Fixed Xcode 5.1 warnings for OS X target.

The warnings were due to conversion from `NSInteger` to `int` which for OS X use 64/32 bits respectively. Instead of typecasting each individual usage, I opted to use `NS_ENUM` which is more future proof too.

Note that this might become an issue on iOS very soon with its progress into 64 bit world.