Updated for TS 0.9.  Added debug() function (maps to log('debug')).