BF: work round int casting bug in numpy 1.4.1

Innocently using int(val) on a uint64 type caused a nasty error that I'd
previously caught in a different context in ``as_int()`` above.  Put in
same fix.