Casting NSUInteger to unsigned long for 64 bits compatibility