use window explicitely instead of implicit this for strict mode compatibility

also remove root variable, which becomes redundant.
in reference to bgrins/spectrum#113