fix gettimeofday_us return type to long

Reported by Yichun Zhang.