As @semaja2 has pointed out, you are missing this #include.
The docs do state:
#MATH#
Note that in addition to functions outlined below all of the newlib math functions described at sourceware.org are also available for use by simply including the math.h header file thus:
The docs are wrong. What is said is that in order to get functions not listed below you need to #include "math.h" - sqrt is listed below. I suppose I should report this at github
I just reread the doco and I would agree this worded poorly, it should just simply state that the spark has the capabilities of the newlibmath library, and to use it you need to include the math.h
There is no compile error when I use time functions Time.zone(), Time.hour(), … without including any files. Same Math library no compile error if function abs() used. I get error only with function sqrt(). Solution is simple: include math.h. I think it would better if some one added such info in doc file.