mruby-time: fix "secure" functions & NO_GMTIME_R

they should only be used if NO_GMTIME_R is undefined