Changed uint64_t cast to int64_t cast. Successfully compiles with Arduino 1.5.6-r2.