OS X -std=c++0x fix in numpy.hpp

Added some static_casts to numpy.hpp. When building on OS X with -std=c++0x, the lack of static_casts caused errors (...non-constant-expression cannot be narrowed from type...).