check for the presence of window and {set,clear}{Timeout,Interval}
for contexts like tests where these might not exist
Merge pull request #20 from substack/non-window

check for the presence of window and {set,clear}{Timeout,Interval}